<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="css/animate.css">
<link rel="stylesheet" href="css/style1.3.20.2.css">
<meta charset="UTF-8">
<title>看看网单页效果</title>
<link rel="shortcut icon" href="img/favicon.ico" />
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/shake_effect.css">
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/check_login.js"></script>
<style type="text/css">
body {
	font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei UI",
		"Microsoft YaHei", SimHei, "\5B8B\4F53", simsun, sans-serif;
	background-color: #FAFAFA;
}

.tab1 {
	margin: 0px;
}

.tab2 {
	margin-top: 80px;
}

#footer {
	padding: 20px;
	text-align: center;
	background-color: #222430;
	margin-top: 20px;
	border-top: 1px solid #ccc;
}

#more {
	width: 80%;
	height: 80%;
	margin: 2px 2px;
}

#jieshao {
	font-size: 16px;
}

.userImg {
	border-radius: 7px;
}

.userAn {
	float: right;
}

.zan {
	float: right;
	width: 35px;
	height: 30px;
	line-height: 30px;
	/* background-color: green; */
	color: #fff;
	font-size: 12px;
	font-family: Microsoft YaHei;
	cursor: pointer;
	display: block;
	text-align: center;
	border-radius: 7px;
}

.zan i {
	display: inline-block;
	*display: inline;
	*zoom: 1;
	color: green;
	background:url("img/icon-thumbs-o-up-blog-h.svg") no-repeat;
	width:25px;
	height:25px;
}

.form-group p {
	position: absolute;
	font-size: 2px;
}

.form-group p span {
	color: red;
	font-weight: bold;
	padding: 0 4px;
}

#liuyan {
	max-height: 612px;
	overflow: scroll;
	overflow-x: hidden;
}
</style>

<style type="text/css">
* {
	margin: 0px;
	padding: 0px;
}

body {
	position: absolute;
	width: 100%;
	height: 100%;
}

#Main {
	height: 600px;
	margin: 40px auto 0px;
	position: relative;
}

#Main .title {
	height: 50px;
	background: #99B3FF;
	color: #fff;
	font-size: 26px;
	text-align: center;
	line-height: 50px;
	font-weight: bold;
}

#Main #Map {
	height: 550px;
}

#Main .Search {
	width: 615px;
	height: 40px;
	background: #fff;
	position: absolute;
	top: 100px;
	left: 180px;
	box-shadow: 0px 0px 20px #000;
}

#Main .Search input.txt {
	width: 515px;
	height: 40px;
	border: 0px;
	float: left;
	text-indent: 10px;
}

#Main .Search input.but {
	width: 100px;
	height: 40px;
	background: #690;
	border: 0px;
	float: left;
	color: #fff;
	font-size: 14px;
	font-family: "微软雅黑";
}

#Main .Menu {
	width: 110px;
	height: 120px;
	background: #fff;
	box-shadow: 0px 0px 10px #000;
}

#Main .Menu ul li {
	list-style-type: none;
	height: 30px;
	font-size: 12px;
	line-height: 30px;
	text-align: Center;
	border-bottom: 1px dotted #ccc;
}

#Main .Menu ul li:hover {
	background: #3397e4;
	color: #fff;
}
</style>
<link rel="stylesheet" href="css/jNotify.jquery.css">
<script src="js/jNotify.jquery.js"></script>
</head>
<body>
	<!-- 导航 -->
	<!-- navbar-fixed-top -->
	<nav class="nav navbar-default  navbar-fixed-top ">
		<div class="container">
			<div class="navbar-header">
				<a href="#" class="navbar-brand" style="margin: 0; padding: 0"><img
					src="img/logo.png" alt=""></a>
				<button type="button" class="navbar-toggle" data-toggle="collapse"
					data-target="#navbar-collapse">
					<span class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
			</div>
			<div class="collapse navbar-collapse" id="navbar-collapse">
				<ul class="nav navbar-nav navbar-right" style="margin-top: 0;">
					<li><a href="index.jsp"><span
							class="glyphicon glyphicon-home"></span> 首页</a></li>
					<li><a href="#"><span class="glyphicon glyphicon-globe"></span>
							景点</a></li>
					<li><a href="#"><span class="glyphicon glyphicon-eye-open"></span>
							世界</a></li>
					<li><a href="#"><span
							class="glyphicon glyphicon-question-sign"></span> 关于</a></li>

					<c:if test="${user !=null}">
						<li><a href="logout.do?page=single"><span
								class="glyphicon glyphicon-remove-circle"></span> 退出</a></li>
						<li><a href="#"><img src="img/touxiang.jpg" width="30px"
								height="30px" class="img-circle" /> &nbsp;${user.username}</a></li>
					</c:if>

					<c:if test="${user.username ==null}">
						<li><a href="#" data-toggle="modal" data-target="#myModal"><span
								class="glyphicon glyphicon-user"></span> 登录</a></li>
						<li><a href="register.html?page=single"><span
								class="glyphicon glyphicon-cloud"></span> 注册</a></li>
					</c:if>
				</ul>
			</div>
		</div>
	</nav>

	<!-- 模态框插件 -->
	<div class="modal fade" id="myModal" data-backdrop="static">
		<div class="modal-dialog modal-sm">
			<div class="modal-content" id="login_form"
				style="width: 520px; height: 420px; margin: 0 auto;">
				<div class="modal-header" style="border: none;">
					<!-- 关闭 -->
					<button type="button" class="close" data-dismiss="modal">
						<span>&times;</span>
					</button>
					<img src="img/register.png" alt="">
					<p class="tab-p text-center" style="font-size: 14px;">——使用手机号/邮箱登录——</p>
				</div>
				<div class="modal-body" style="margin-top: -25px;">
					<!-- <form class="form-inline"> -->
					<form class="form-horizontal">
						<div class="form-group">
							<div class="col-md-8 col-md-offset-2">
								<input type="text" name="username" id="username"
									class="form-control" placeholder="输入手机号或者邮箱" required>
							</div>
						</div>
						<div class="form-group">
							<div class="col-md-8 col-md-offset-2">
								<input type="password" name="password" id="password"
									class="form-control" placeholder="密码" required>
							</div>
						</div>
						<div class="form-group">
							<div class="col-md-8 col-md-offset-2">
								<button type="button" id="login" class="btn btn-primary"
									style="width: 315px; height: 30px;">登录</button>
							</div>
						</div>
					</form>
				</div>
				<div class="modal-footer" style="border: none;">
					<p class="tab-p text-center"
						style="font-size: 14px; margin-top: -30px;">——使用第三方账号登录——</p>
					<!-- <p class="tab-p" style="font-size:14px;margin-top:-15px;">还没有看看账号？<a href="">点击注册</a></p> -->
					<div class="form-group">
						<div class="col-md-8 col-md-offset-2">
							<div class="col-md-3 col-sm-6" class="third pic_weibo">
								<a href=""><img src="img/weibo2.png"
									onmouseover="this.src=img/weibo1.png" alt=""></a>
							</div>
							<div class="col-md-3 col-sm-6">
								<a href=""><img src="img/qq2.png" alt=""></a>
							</div>
							<div class="col-md-3 col-sm-6">
								<a href=""><img src="img/weixin2.png" alt=""></a>
							</div>
							<div class="col-md-3 col-sm-6">
								<a href=""><img src="img/douban2.png" alt=""></a>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div class="tab2">
		<div class="container">
			<ol class="breadcrumb">
				<li><a href="index.jsp">首页</a></li>
				<li><a href="list.jsp">西南</a></li>
				<li class="active">重庆</li>
			</ol>
		</div>
	</div>

	<div class="tab3">
		<div class="container">
			<div class="row">
				<div class="col-md-9"
					style="border-radius: 5px; background-color: #fff;">
					<div class="col-md-12">
						<div class="page-header">
							<h1>
								龚滩古镇 <small> 不虚此行</small>
							</h1>
							<p class="text-muted">
								<span class="glyphicon glyphicon-map-marker"></span> 重庆市酉阳
							</p>
						</div>
					</div>
					<a href="#"><img src="img/pic78.jpg" alt=""
						class="img-responsive img-rounded"></a>
					<div class="col-md-12"
						style="margin-top: 15px; border-top: 1px dashed #A3A3A3; padding-top: 5px;">
						<p id="jieshao">龚滩古镇位于乌江与阿蓬江的交汇，隔江与贵州省沿河县相望，是酉阳乌江百里画廊的起点，自古以来便是乌江流域乃至长江流域的货物中转站</p>
					</div>
					<a href="#"><img src="img/pic79.jpg" alt=""
						class="img-responsive img-rounded"></a>
					<div class="col-md-12"
						style="margin-top: 15px; border-top: 1px dashed #A3A3A3; padding-top: 5px;">
						<p id="jieshao">龚滩古镇现存长约三公里的石板街、150余堵封火墙、200多个四合院、50多座形态各异的吊脚楼，是国内保存完好且颇具规模的明清建筑群。滩古镇是中国历史文化名镇、重庆市第一历史文化名镇、国家AAAA级旅游景区，重庆著名旅游胜地，被誉为“乌江画廊核心景区和璀璨明珠”。</p>
					</div>
					<a href="#"><img src="img/pic80.jpg" alt=""
						class="img-responsive img-rounded" style="margin-bottom: 10px;"></a>

					<div id="Main">
						<div class="title">知目的，明方向</div>

						<!--地图开始-->
						<div id="Map"></div>
						<!--地图结束-->

						<!--搜索开始-->
						<div class="Search">
							<input id="cityName" placeholder="请输入城市的名称" type="text"
								class="txt" /> <input id="query" value="搜  索" type="button"
								class="but" />
						</div>
						<!--搜索结束-->

						<!--菜单开始
		<div class="Menu">
			<ul>
				<li class="hover">缩小</li>
				<li>放大</li>
				<li>测量距离</li>
				<li>添加标记</li>
			<ul>
		</div>-->
						<!--菜单结束-->
					</div>

					<script type="text/javascript"
						src="http://webapi.amap.com/maps?v=1.3&key=b245ae8390f2ecdc0e5706241c28fc7b"></script>
					<script type="text/javascript">
						var map, toolBar, mouseTool, contextMenu;
						//初始化地图对象，加载地图
						map = new AMap.Map("Map", {
							resizeEnable : true
						});

						//设置城市
						document.getElementById('query').onclick = function() {
							var cityName = document.getElementById('cityName').value;
							if (!cityName) {
								cityName = '北京市';
							}
							map.setCity(cityName);
						};

						//地图中添加地图操作ToolBar插件、鼠标工具MouseTool插件
						map.plugin([ "AMap.ToolBar", "AMap.MouseTool" ],
								function() {
									toolBar = new AMap.ToolBar();
									map.addControl(toolBar);
									mouseTool = new AMap.MouseTool(map);
								});

						//自定义右键菜单内容
						var menuContent = document.createElement("div");
						menuContent.innerHTML = "<div class='Menu'>"
								+ "<ul>"
								+ "<li class='hover' onclick='zoomMenu(0)'>缩小</li>"
								+ "<li onclick='zoomMenu(1)'>放大</li>"
								+ "<li onclick='distanceMeasureMenu()'>测量距离</li>"
								+ "<li onclick='addMarkerMenu()'>添加标记</li>"
								+ "<ul>" + "</div>"
						//创建右键菜单
						contextMenu = new AMap.ContextMenu({
							isCustom : true,
							content : menuContent
						});//通过content自定义右键菜单内容

						//地图绑定鼠标右击事件——弹出右键菜单
						AMap.event.addListener(map, 'rightclick', function(e) {
							contextMenu.open(map, e.lnglat);
							contextMenuPositon = e.lnglat; //右键菜单位置
						});
						contextMenu.close();
						//右键菜单缩放地图
						function zoomMenu(tag) {
							if (tag === 0) {
								map.zoomOut();
							}
							if (tag === 1) {
								map.zoomIn();
							}
							contextMenu.close();
						}

						//右键菜单距离量测
						function distanceMeasureMenu() {
							mouseTool.rule();
							contextMenu.close();
						}

						//右键菜单添加Marker标记
						function addMarkerMenu() {
							mouseTool.close();
							var marker = new AMap.Marker(
									{
										map : map,
										position : contextMenuPositon, //基点位置
										icon : "http://webapi.amap.com/images/marker_sprite.png", //marker图标，直接传递地址url
										offset : {
											x : -8,
											y : -34
										}
									//相对于基点的位置
									});
							contextMenu.close();
						}
					</script>

				</div>
				<div class="col-md-3" style="border-radius: 5px;">
					<a href="#"><img src="img/pic81.jpg" alt=""
						class="img-responsive img-rounded"></a>
					<div class="panel panel-default" style="margin-top: 25px;">
						<div class="panel-heading">
							<h3 class="panel-title">
								<span class="glyphicon glyphicon-tags"></span> 标签
							</h3>
						</div>
						<div class="panel-body">山水, 乡村, 古镇, 楼房</div>
					</div>
					<div class="panel panel-success" style="margin-top: 25px;">
						<div class="panel-heading">
							<h3 class="panel-title">
								<span class="glyphicon glyphicon-fire"></span> 热门景点
							</h3>
						</div>
						<div class="panel-body">
							<div class="panel-group" id="accordion">
								<div class="panel panel-info">
									<div class="panel-heading">
										<h4 class="panel-title">
											<a href="#collapseOne" data-toggle="collapse"
												data-parent="#accordion">鸳鸯楼</a>
										</h4>
									</div>
									<div id="collapseOne" class="panel-collapse collapse">
										<div class="panel-body">房屋后有两个相并的四合天井，居住一户冉姓，一户杨姓，冉家有位绕巴涅（男孩），而杨家有位惹巴涅（女孩），两个人青梅竹马，暗生爱慕之心，但是这样不行啊，因为当时种族观念和门当户对的观念在毕兹卡心中是根深蒂固，就造成了一个终生未娶一个终生未嫁，后来为了纪念这俩人的恋情，就将此楼命名为鸳鸯楼</div>
									</div>
								</div>
								<div class="panel panel-default">
									<div class="panel-heading">
										<h4 class="panel-title">
											<a href="#collapseTwo" data-toggle="collapse"
												data-parent="#accordion">西秦会馆</a>
										</h4>
									</div>
									<div id="collapseTwo" class="panel-collapse collapse">
										<div class="panel-body">光绪年间，陕西商人张朋久最先来龚滩开设盐号，并亲自经手修建了"西秦会馆"，因会馆的建筑风格和一般寺观庙宇大致相同，红粉涂墙，所以当地人称之为"红庙子"。西秦会馆是古镇最高大宏伟的建筑，也是具有外来风格的建筑。它四周围以烽火墙，外壁朱红粉饰，馆内地面都以石板铺就，大门临街西开，内设正殿、偏殿、耳房、戏楼，雕梁画栋，筒瓦覆顶。如今虽已物是人非，已然透露出一派衰败萧条景象，但仍有一股宏大挺拔的气派。</div>
									</div>
								</div>

								<div class="panel panel-success">
									<div class="panel-heading">
										<h4 class="panel-title">
											<a href="#collapseThree" data-toggle="collapse"
												data-parent="#accordion">鲤鱼跳龙门</a>
										</h4>
									</div>
									<div id="collapseThree" class="panel-collapse collapse">
										<div class="panel-body">天然形成的"鲤鱼跳龙门"。一块鱼形的石头突兀的横在道路边的石壁中，犹如一条正在侧身跃龙门的鲤鱼，靠河吃饭的龚滩人固执的认为这是河神的化身，是可以庇护船只出行的，所以这条"鲤鱼"受到了当地人的追捧，很多要驾船出行的人都会到这里祈求一路顺风。所以很多游客到了这里也会拜拜这条"神鱼"。</div>
									</div>
								</div>

								<div class="panel panel-warning">
									<div class="panel-heading">
										<h4 class="panel-title">
											<a href="#collapseFour" data-toggle="collapse"
												data-parent="#accordion">桥重桥</a>
										</h4>
									</div>
									<div id="collapseFour" class="panel-collapse collapse">
										<div class="panel-body">桥重桥是桥中名桥，有"不知桥重桥，不是龚滩人"之说。桥重桥是由两座桥重叠成的一座小拱桥，从下面的桥走到上面的桥只有几步石梯，两桥错落有致。"这种桥上叠桥的桥，是龚滩独有。</div>
									</div>
								</div>
							</div>
						</div>
					</div>

					<div class="panel panel-info">

						<div class="panel-heading">
							<span class="glyphicon glyphicon-envelope"></span> 留言区
						</div>

						<div class="panel-body" id="liuyan">
							<c:if test="${words !=null }">
								<c:forEach items="${words }" var="w">
									<img src="img/touxiang.jpg" width="30px" height="30px"
										class="userImg" />
									<font color="green" size="1">${w.userEmail }</font>
									<span class="zan">
									    <c:if test="${w.clickCount==0}">
											<i></i>
										</c:if>
									    <c:if test="${w.clickCount<10 && w.clickCount>0}">
											<i>${w.clickCount}</i>
										</c:if>
										<c:if test="${w.clickCount>=10}">
											<i><font color="red">10+</font></i>
										</c:if> 
										<input type="hidden" class="id" value="${w.id}" /> 
										<input type="hidden" class="count" value="${w.clickCount}" />
									</span>
									<br />
									<div class="well">
										${w.words } <br /> <font size="1">${w.time }</font>
									</div>
									<hr />
								</c:forEach>
							</c:if>
							<input type="hidden" class="huser" value="${user.email }">
						</div>
					</div>
					<!-- 评论框开始 -->
					<hr>
					<div class="form-group">
						<textarea class="form-control" style="min-height: 50px; max-height: 150px;" id="words" maxlength="150">${k==null ? null:k }</textarea>
						<p>
							还可以输入<span id="num">150</span>个字
						</p>
						<button class="btn btn-info btn-sm" type="submit" id="in_word"
							style="margin-top: 8px; float: right;">评论</button>
					</div>
					<!-- 评论框结束 -->


				</div>
			</div>
		</div>
	</div>

	<!-- 底部 -->
	<footer id="footer" class="text-muted">
		<div class="container" style="border-bottom: 1px solid #666">
			<div class="row">
				<div class="col-md-7">
					<div class="row">
						<div class="col-md-3 col-sm-6">
							<p class="text-success" style="padding-bottom: 2px;">关于我们</p>
						</div>
						<div class="col-md-3 col-sm-6">
							<p class="text-warning" style="padding-bottom: 2px;">商家服务</p>
						</div>
						<div class="col-md-3 col-sm-6">
							<p class="text-danger" style="padding-bottom: 2px;">合作伙伴</p>
						</div>
						<div class="col-md-3 col-sm-6">
							<p class="text-info" style="padding-bottom: 2px;">了解更多</p>
						</div>
						<div class="col-md-3 col-sm-6 ">
							<a href="#" class="text-muted">看看介绍</a>
						</div>
						<div class="col-md-3 col-sm-6">
							<a href="#" class="text-muted">商家登录</a>
						</div>
						<div class="col-md-3 col-sm-6">
							<a href="#" class="text-muted">xx旅游局</a>
						</div>
					</div>
				</div>
				<div class="col-md-3  col-md-offset-2">
					<p class="text-muted" style="padding-bottom: 10px;">
						关注我们 <span class="glyphicon glyphicon-hand-down"></span>
					</p>
					<div class="row">
						<div class="col-md-3 col-xs-3 col-sm-3">
							<a href="#"><img src="img/facebook.png" alt=""
								class="img-circle" id="more"></a>
						</div>
						<div class="col-md-3 col-xs-3 col-sm-3">
							<a href="#"><img src="img/tumblr.png" alt=""
								class="img-circle" id="more"></a>
						</div>
						<div class="col-md-3 col-xs-3 col-sm-3">
							<a href="#"><img src="img/twitter.png" alt=""
								class="img-circle" id="more"></a>
						</div>
						<div class="col-md-3 col-xs-3 col-sm-3">
							<a href="#"><img src="img/whatsapp.png" alt=""
								class="img-circle" id="more"></a>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="row" style="margin-top: 5px;">
			<div class="col-md-6">CopyRight@2015~2016 All Rights Reserved</div>
			<div class="col-md-6 col-md-pull-3">看看网 www.xx.com 版权所有</div>
		</div>
	</footer>

	<script type="text/javascript">
		$(function() {
			//自动播放
			$('#myCarousel').carousel({
				interval : 4000,
			});
		});
	</script>
	<script type="text/javascript">
		$('#nav a').on('click', function(e) {
			//阻止默认行为
			e.preventDefault();
			$(this).tab('show');
		});
	</script>

	<!-- 点击评论 -->
	<script type="text/javascript">
		$(function() {
			$("#in_word").click(function() {
				var email = $(".huser").val().trim();
				var words = $("#words").val().trim();
				//alert(words);
				//alert(email);

				if (email.length > 0 && words.length > 0) {

					var url = "toSpeak.do";
					args = {
						"email" : email,
						"words" : words,
						"time" : new Date()
					};
					$.post(url, args, function(data) {
						jSuccess("评论成功!", {//评论成功提示
							HorizontalPosition : "center",// 水平位置:left, center, right
							VerticalPosition : "center",// 垂直位置：top, center, bottom
							TimeShown : 300,
							//2秒后触发以下方法
							onClosed : function() {

								window.location.href = "single.jsp";
							},

						});

					})
				} else {
					if (email.length == 0) {//如果用户不存在，弹出登陆框
						$("#myModal").modal('show');
					}
					if (words.length == 0 && email.length > 0) {//如果用户已经登陆，内容为空，弹出提示输入内容。
						jSuccess("请输入评论内容!", {
							HorizontalPosition : "center",// 水平位置:left, center, right
							VerticalPosition : "center",// 垂直位置：top, center, bottom
							TimeShown : 300,
							//2秒后触发以下方法
							onClosed : function() {

								//window.location.href="single.jsp";						
							},

						});
					}

				}

				return false;
			});
		})
	</script>
	<!-- 评论结束 -->


	<!-- 点赞开始 -->
	<script type="text/javascript">
		(
				function($) {
					$.extend({
						tipsBox : function(options) {
							options = $.extend({
								obj : null, //jq对象，要在那个html标签上显示
								str : "+1", //字符串，要显示的内容;也可以传一段html，如: "<b style='font-family:Microsoft YaHei;'>+1</b>"
								startSize : "12px", //动画开始的文字大小
								endSize : "30px", //动画结束的文字大小
								interval : 600, //动画时间间隔
								color : "red", //文字颜色
								callback : function() {
								} //回调函数
							}, options);
							$("body").append(
									"<span class='num'>" + options.str
											+ "</span>");
							var box = $(".num");
							var left = options.obj.offset().left
									+ options.obj.width() / 2;
							var top = options.obj.offset().top
									- options.obj.height();
							box.css({
								"position" : "absolute",
								"left" : left + "px",
								"top" : top + "px",
								"z-index" : 9999,
								"font-size" : options.startSize,
								"line-height" : options.endSize,
								"color" : options.color
							});
							box.animate({
								"font-size" : options.endSize,
								"opacity" : "0",
								"top" : top - parseInt(options.endSize) + "px"
							}, options.interval, function() {
								box.remove();
								options.callback();
							});
						}
					});
				})(jQuery);

		function niceIn(prop) {
			prop.find('i').addClass('niceIn');
			setTimeout(function() {
				prop.find('i').removeClass('niceIn');
			}, 1000);
		}
		$(function() {
			$(".zan").click(function() {
				
				           
				            <%--点赞次数累加开始--%>
					        var id = $(this).find("input[class=id]").val();
							var count = $(this).find("input[class=count]").val();
							var i = parseInt(count) + 1;
							$(this).find("input[class=count]").val(i)

							//控制评论次数100次以内自增
							if (i<11) {
								$(this).find("i").text(i);
								
								$.tipsBox({
									obj : $(this),
									str : "+1",
									callback : function() {
									}
								});
								niceIn($(this));
								
								
								//异步请求
								$.ajax({
									type : "post",//请求类型
									url : "count.do",//请求地址
									data : {
										"id" : id,
										"count" : i
									},//传递参数
									success : function(data) {

									}
								});
							}else{//大于10显示10+
								$(this).find("i").html("<font color='red'>10+</font>");
								$.tipsBox({
									obj : $(this),
									str : "+1",
									callback : function() {
									}
								});
								niceIn($(this));
							}
					<%--点赞次数累加结束--%>
						return false;
					}),function(){
						//取消点赞的ajax（）
						return true;
					};
		});
	</script>
	<!-- 点赞结束 -->
	<!-- 监听评论字数 -->
	<script type="text/javascript">
		//监控键盘事件
		$("#words").keyup(function() {
			var len = $(this).val().length;
			if (len <= 150) {
				$("#num").text(150 - len);
			} else {
				$("#num").text(0)
			}
		});
		
		$('#words').change(function(){
			var word=$(this).val().trim();
			//alert(word);
			var u="${sessionScope.user}"
			//alert(u);
			if(word !=null && word!=""){
				if(u=="" || u==null){
					//alert(1);
					var url="keepWords.do";
					var args={"keyword":word,"time":new Date()};
					$.post(url,args,function(data){
						
					});
				}
				
			}
		});
	</script>
	<script type="text/javascript">
   $('#login').click(function(){
	   var username=$("#username").val();
	   var password=$("#password").val();
	   
	   
	   //alert(username);
	   //alert(password);
	   
	   var url="login.do";
	   var args={"username":username,"password":password,"time":new Date()};
	   $.post(url,args,function(data){
		   
		   if("error"==data){
			   $("#password").val("");
		   }
		  window.lacation.href="single.jsp"
		   
	   });
   });


</script>
</body>
</html>
